Embodiments of the present invention relate to data processing systems and more particularly to systems and applications pertaining to streaming data with temporal semantics.
Generally, Complex Event Processing (CEP) is an approach that aggregates information from distributed message-based systems, databases, and applications in real-time and dynamically applies rules to discern patterns and trends that would otherwise go unnoticed. This gives companies the ability to identify and even anticipate exceptions and opportunities represented by seemingly unrelated events across highly complex, distributed, and heterogeneous IT environments. CEP may be used to correlate, aggregate, enrich, and detect patterns in high speed streaming data in near real time.
Furthermore, Continuous Query Language (CQL) statements are used to process event streams comprising events. An event stream can be considered a sequence of <tuple, timestamp> pairs, with the tuple referring to the data portion. A stream can have multiple tuples and timestamps can define an order over the tuples in an event stream. Oracle™ Complex Event Processing (OCEP) is used to process such event streams.
Further, a CEP application can have multiple queries and views, which are then executed by a processor. Any real-world application may consist of hundreds of queries and views that only differ in a certain value like range parameter. Maintaining hundreds of queries and views in such a scenario can become a nightmare because a small change in base query or view will lead to affecting hundreds of dependent queries and views.
Use of a form of parameterization or wildcard placeholders provision helps application developers in writing similar queries and views, which differ only by a small criterion. In one embodiment, users are allowed to put wildcard placeholders, which can then be bound with values at runtime. Parameterized Query or view can be viewed as a template, which can then be used for different values. This provides users with the ability to write a single CQL statement that internally can generate multiple CQL statements for different values provided in the bindings.
For Example:
                SELECT symbol, AVG(price) AS average, NASDAQ AS market        FROM StockTick t RETAIN ALL EVENTS        WHERE symbol=ORCL        SELECT symbol, AVG(price) AS average, NYSE AS market        FROM StockTick t RETAIN ALL EVENTS        WHERE symbol=JPM        SELECT symbol, AVG(price) AS average, NYSE AS market        FROM StockTick t RETAIN ALL EVENTS        WHERE symbol=WFC        
It should be noted that the above queries differ either in constant value in project list or constant value in WHERE condition. If there are hundreds of such queries, then any business user might have to write hundreds of such queries and views. Hence, for these and other reasons, improvements in the art are needed.